<!--
Copyright Louis Dionne 2013-2016
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Boost.Hana: Assertions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
// Copyright Louis Dionne 2013-2016
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
MathJax.Hub.Config({
    "HTML-CSS": {
        linebreaks: {
            automatic: true,
            width: "75% container"
        }
    }
});
</script><script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<!-- Additional javascript for drawing charts. -->
<script type="text/javascript" src="highcharts.js"></script>
<script type="text/javascript" src="highcharts-data.js"></script>
<script type="text/javascript" src="highcharts-exporting.js"></script>
<script type="text/javascript" src="chart.js"></script>
<script type="text/javascript" src="hana.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Boost.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Boost.Hana
   &#160;<span id="projectnumber">1.0.2</span>
   </div>
   <div id="projectbrief">Your standard library for metaprogramming</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group-assertions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">Assertions</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Macros to perform different kinds of assertions. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gae4eb14a3b31e44f433b080d9bc2d14fd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#gae4eb14a3b31e44f433b080d9bc2d14fd">BOOST_HANA_RUNTIME_ASSERT</a>(condition)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:gae4eb14a3b31e44f433b080d9bc2d14fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expands to a runtime assertion.  <a href="#gae4eb14a3b31e44f433b080d9bc2d14fd">More...</a><br /></td></tr>
<tr class="separator:gae4eb14a3b31e44f433b080d9bc2d14fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e25bbdeefb0e5fbf45ffa9227ddb8d2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga2e25bbdeefb0e5fbf45ffa9227ddb8d2">BOOST_HANA_RUNTIME_ASSERT_MSG</a>(condition,  message)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:ga2e25bbdeefb0e5fbf45ffa9227ddb8d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_RUNTIME_ASSERT</code>, but allows providing a custom failure message.  <a href="#ga2e25bbdeefb0e5fbf45ffa9227ddb8d2">More...</a><br /></td></tr>
<tr class="separator:ga2e25bbdeefb0e5fbf45ffa9227ddb8d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2626fa0c92b308cee62ac423ae2dba41"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga2626fa0c92b308cee62ac423ae2dba41">BOOST_HANA_CONSTANT_ASSERT</a>(condition)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:ga2626fa0c92b308cee62ac423ae2dba41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compile-time assertion for <code>Constant</code>s.  <a href="#ga2626fa0c92b308cee62ac423ae2dba41">More...</a><br /></td></tr>
<tr class="separator:ga2626fa0c92b308cee62ac423ae2dba41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9961218055c571b279bb6e07befbba4d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga9961218055c571b279bb6e07befbba4d">BOOST_HANA_CONSTANT_ASSERT_MSG</a>(condition,  message)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:ga9961218055c571b279bb6e07befbba4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_CONSTANT_ASSERT</code>, but allows providing a custom failure message.  <a href="#ga9961218055c571b279bb6e07befbba4d">More...</a><br /></td></tr>
<tr class="separator:ga9961218055c571b279bb6e07befbba4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90c1df2cb8eb67e8e0c822eac180b7bc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga90c1df2cb8eb67e8e0c822eac180b7bc">BOOST_HANA_ASSERT</a>(condition)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:ga90c1df2cb8eb67e8e0c822eac180b7bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expands to the strongest form of assertion possible for the given condition.  <a href="#ga90c1df2cb8eb67e8e0c822eac180b7bc">More...</a><br /></td></tr>
<tr class="separator:ga90c1df2cb8eb67e8e0c822eac180b7bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7690973ea7b2ba5b6a72a6293fce873"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#gaa7690973ea7b2ba5b6a72a6293fce873">BOOST_HANA_ASSERT_MSG</a>(condition,  message)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:gaa7690973ea7b2ba5b6a72a6293fce873"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_ASSERT</code>, but allows providing a custom failure message.  <a href="#gaa7690973ea7b2ba5b6a72a6293fce873">More...</a><br /></td></tr>
<tr class="separator:gaa7690973ea7b2ba5b6a72a6293fce873"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga046d7ee458de8da63812fe2f059c0a4d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga046d7ee458de8da63812fe2f059c0a4d">BOOST_HANA_CONSTEXPR_ASSERT</a>(condition)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:ga046d7ee458de8da63812fe2f059c0a4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expands to a static assertion or a runtime assertion, depending on whether <code>constexpr</code> lambdas are supported.  <a href="#ga046d7ee458de8da63812fe2f059c0a4d">More...</a><br /></td></tr>
<tr class="separator:ga046d7ee458de8da63812fe2f059c0a4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a1327b758604bf330efeba450dd4a95"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0a1327b758604bf330efeba450dd4a95"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga0a1327b758604bf330efeba450dd4a95">BOOST_HANA_CONSTEXPR_ASSERT_MSG</a>(condition,  message)&#160;&#160;&#160;unspecified</td></tr>
<tr class="memdesc:ga0a1327b758604bf330efeba450dd4a95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_CONSTEXPR_ASSERT</code>, but allows providing a custom failure message. <br /></td></tr>
<tr class="separator:ga0a1327b758604bf330efeba450dd4a95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1cd7a2be93e2bf4e9a18c7043276373e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1cd7a2be93e2bf4e9a18c7043276373e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga1cd7a2be93e2bf4e9a18c7043276373e">BOOST_HANA_RUNTIME_CHECK_MSG</a>(condition,  message)                              </td></tr>
<tr class="memdesc:ga1cd7a2be93e2bf4e9a18c7043276373e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_RUNTIME_ASSERT_MSG</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:ga1cd7a2be93e2bf4e9a18c7043276373e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29b2b21ffa5513e5b706c50ffee980af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga29b2b21ffa5513e5b706c50ffee980af"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga29b2b21ffa5513e5b706c50ffee980af">BOOST_HANA_RUNTIME_CHECK</a>(...)                                                                    </td></tr>
<tr class="memdesc:ga29b2b21ffa5513e5b706c50ffee980af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_RUNTIME_ASSERT</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:ga29b2b21ffa5513e5b706c50ffee980af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga41a7490fd94005e6b6a3b6a900207063"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga41a7490fd94005e6b6a3b6a900207063"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga41a7490fd94005e6b6a3b6a900207063">BOOST_HANA_CONSTANT_CHECK_MSG</a>(condition,  message)                            </td></tr>
<tr class="memdesc:ga41a7490fd94005e6b6a3b6a900207063"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_CONSTANT_ASSERT_MSG</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:ga41a7490fd94005e6b6a3b6a900207063"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4bf9e0c46c44e21fbe5c5fbb3ace8356"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4bf9e0c46c44e21fbe5c5fbb3ace8356"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga4bf9e0c46c44e21fbe5c5fbb3ace8356">BOOST_HANA_CONSTANT_CHECK</a>(...)                                                                  </td></tr>
<tr class="memdesc:ga4bf9e0c46c44e21fbe5c5fbb3ace8356"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_CONSTANT_ASSERT</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:ga4bf9e0c46c44e21fbe5c5fbb3ace8356"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7af67ae500a237fe350f1bfceb4a5afa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7af67ae500a237fe350f1bfceb4a5afa"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga7af67ae500a237fe350f1bfceb4a5afa">BOOST_HANA_CHECK_MSG</a>(condition,  message)                                              </td></tr>
<tr class="memdesc:ga7af67ae500a237fe350f1bfceb4a5afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_ASSERT_MSG</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:ga7af67ae500a237fe350f1bfceb4a5afa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga512de1fcd31e8a34931ffb2c891afd36"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga512de1fcd31e8a34931ffb2c891afd36"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga512de1fcd31e8a34931ffb2c891afd36">BOOST_HANA_CHECK</a>(...)                                                                                    </td></tr>
<tr class="memdesc:ga512de1fcd31e8a34931ffb2c891afd36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA__ASSERT</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:ga512de1fcd31e8a34931ffb2c891afd36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa76ba567944adfec0dce60cc20be35bc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa76ba567944adfec0dce60cc20be35bc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#gaa76ba567944adfec0dce60cc20be35bc">BOOST_HANA_CONSTEXPR_CHECK_MSG</a>(condition,  message)                          &#160;&#160;&#160;<a class="el" href="group__group-assertions.html#ga1cd7a2be93e2bf4e9a18c7043276373e">BOOST_HANA_RUNTIME_CHECK_MSG</a>(condition, message)                    \</td></tr>
<tr class="memdesc:gaa76ba567944adfec0dce60cc20be35bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_CONSTEXPR_ASSERT_MSG</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:gaa76ba567944adfec0dce60cc20be35bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5150cd7df438a22056a39529d21562d2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5150cd7df438a22056a39529d21562d2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group-assertions.html#ga5150cd7df438a22056a39529d21562d2">BOOST_HANA_CONSTEXPR_CHECK</a>(...)                                                                </td></tr>
<tr class="memdesc:ga5150cd7df438a22056a39529d21562d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>BOOST_HANA_CONSTEXPR_ASSERT</code>, but not influenced by the <code>BOOST_HANA_CONFIG_DISABLE_ASSERTIONS</code> config macro. For internal use only. <br /></td></tr>
<tr class="separator:ga5150cd7df438a22056a39529d21562d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gae4eb14a3b31e44f433b080d9bc2d14fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BOOST_HANA_RUNTIME_ASSERT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition</td><td>)</td>
          <td>&#160;&#160;&#160;unspecified</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</code></p>

<p>Expands to a runtime assertion. </p>
<p>Given a condition known at runtime, this macro expands to a runtime assertion similar to the <code>assert</code> macro. The provided condition must be explicitly convertible to a <code>bool</code>, and it must not be a model of the <code>Constant</code> concept. If the condition is a <code>Constant</code>, a static assertion will be triggered, asking you to use the <code>BOOST_HANA_CONSTANT_ASSERT</code> macro instead.</p>
<dl class="section note"><dt>Note</dt><dd>This macro may only be used at function scope. </dd></dl>

</div>
</div>
<a class="anchor" id="ga2e25bbdeefb0e5fbf45ffa9227ddb8d2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BOOST_HANA_RUNTIME_ASSERT_MSG</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">message&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;unspecified</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</code></p>

<p>Equivalent to <code>BOOST_HANA_RUNTIME_ASSERT</code>, but allows providing a custom failure message. </p>
<dl class="section warning"><dt>Warning</dt><dd>Conditions that contain multiple comma-separated elements should be parenthesized. </dd></dl>

</div>
</div>
<a class="anchor" id="ga2626fa0c92b308cee62ac423ae2dba41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BOOST_HANA_CONSTANT_ASSERT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition</td><td>)</td>
          <td>&#160;&#160;&#160;unspecified</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</code></p>

<p>Compile-time assertion for <code>Constant</code>s. </p>
<p>Given a condition known at compile-time in the form of a <code>Constant</code>, this macro expands to a compile-time assertion similar to a <code>static_assert</code>. The provided condition must be a model of the <code>Constant</code> concept, in which case its value is retrieved using <code>hana::value</code> and then converted to a <code>bool</code>. If the condition is not a <code>Constant</code>, a static assertion will be triggered, asking you to use the <code>BOOST_HANA_RUNTIME_ASSERT</code> macro instead.</p>
<p>This macro may be used at global/namespace scope and function scope only; it may not be used at class scope. Note that the condition may never be evaluated at runtime. Hence, any side effect may not take place (but you shouldn't rely on side effects inside assertions anyway). </p>

</div>
</div>
<a class="anchor" id="ga9961218055c571b279bb6e07befbba4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BOOST_HANA_CONSTANT_ASSERT_MSG</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">message&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;unspecified</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</code></p>

<p>Equivalent to <code>BOOST_HANA_CONSTANT_ASSERT</code>, but allows providing a custom failure message. </p>
<dl class="section warning"><dt>Warning</dt><dd>Conditions that contain multiple comma-separated elements should be parenthesized. </dd></dl>

</div>
</div>
<a class="anchor" id="ga90c1df2cb8eb67e8e0c822eac180b7bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BOOST_HANA_ASSERT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition</td><td>)</td>
          <td>&#160;&#160;&#160;unspecified</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</code></p>

<p>Expands to the strongest form of assertion possible for the given condition. </p>
<p>Given a condition, <code>BOOST_HANA_ASSERT</code> expands either to a compile-time or to a runtime assertion, depending on whether the value of the condition is known at compile-time or at runtime. Compile-time assertions are always preferred over runtime assertions. If the condition is a model of the <code>Constant</code> concept, its value (retrievable with <code>hana::value</code>) is assumed to be explicitly convertible to <code>bool</code>, and a compile-time assertion is performed on it. Otherwise, the condition itself is assumed to be explicitly convertible to <code>bool</code>, and a runtime assertion is performed on it.</p>
<p>If the assertion can be carried out at compile-time, the condition is not guaranteed to be evaluated at runtime at all (but it may). Hence, in general, you shouldn't rely on side effects that take place inside an assertion.</p>
<dl class="section note"><dt>Note</dt><dd>This macro may only be used at function scope. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa7690973ea7b2ba5b6a72a6293fce873"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BOOST_HANA_ASSERT_MSG</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">message&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;unspecified</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</code></p>

<p>Equivalent to <code>BOOST_HANA_ASSERT</code>, but allows providing a custom failure message. </p>
<dl class="section warning"><dt>Warning</dt><dd>Conditions that contain multiple comma-separated elements should be parenthesized. </dd></dl>

</div>
</div>
<a class="anchor" id="ga046d7ee458de8da63812fe2f059c0a4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BOOST_HANA_CONSTEXPR_ASSERT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">condition</td><td>)</td>
          <td>&#160;&#160;&#160;unspecified</td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="assert_8hpp.html">boost/hana/assert.hpp</a>&gt;</code></p>

<p>Expands to a static assertion or a runtime assertion, depending on whether <code>constexpr</code> lambdas are supported. </p>
<p>This macro is used to assert on a condition that would be a constant expression if constexpr lambdas were supported. Right now, constexpr lambdas are not supported, and this is always a runtime assertion. Specifically, this is equivalent to <code>BOOST_HANA_RUNTIME_ASSERT</code>. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Copyright Louis Dionne 2013-2016
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
  </ul>
</div>
</body>
</html>
